<template>
  <PageTemplate>
    <div slot="content">
            <!-- <div class="brand">
                <breadcrumb :arrayName="brand" :hasIcon="hasIcon"></breadcrumb>
            </div> -->
            <div class="container container-top " >
                <el-form  label-width="150px"  :model="delegate" :rules="delegateRules"   ref="delegate" >
                    <el-collapse v-model="showCollapse" accordion>
                        <el-collapse-item name="collapse" class="search-collapse-title">
                            <template slot="title">
                                <span class="vertical-bar" style="margin:0;" ></span>
                                <font  class="collapse-content" >{{$t('te.add')}}( <font >*</font> {{$t('te.must_fill')}})</font>
                            </template>
                            <div class="div-form">
                                <el-row>
                                    <el-col :span="12">
                                        <el-form-item  :label="$t('wd.delegate_man')"   >
                                            <el-input class="form-input" readonly="readonly" size="small" v-model="delegate.man" ></el-input>
                                        </el-form-item>
                                    </el-col>
    
                                    <el-col :span="12">
                                        <el-form-item  :label="$t('wd.trust_man')"   >
                                            <PersonSelect id="delegateUser" :multiple="false" ></PersonSelect>
                                        </el-form-item>
                                    </el-col>
                                </el-row>  
                                
                                <el-row>
                                    <el-col :span="12">
                                        <el-form-item :label="$t('wd.begin_time')">
                                            <el-date-picker  class="form-input" value-format="yyyy-MM-dd" v-model="delegate.beginTime" type="date" size="small" >
                                            </el-date-picker>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="12">
                                        <el-form-item :label="$t('wd.end_time')">
                                            <el-date-picker  class="form-input" value-format="yyyy-MM-dd" v-model="delegate.endTime" type="date" size="small" >
                                            </el-date-picker>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
    
                                <el-row>
                                    <el-col :span="12">
                                        <el-form-item>
                                            <el-button size="small" @click="saveDelegate('delegate')" class="btn-default">{{$t('cm.save')}}</el-button>
                                            <el-button size="small" @click="goBack" class="btn-second">{{$t('cm.cancel')}}</el-button>
                                        </el-form-item>
                                    </el-col>
                                </el-row>
                            </div>
                        </el-collapse-item>
                    </el-collapse>
    
                </el-form>    
            </div>
        </div>
        </PageTemplate>
    </template>
    
    
    <script>
    import work_delegates_add from './js/work_delegates_add'
    export default work_delegates_add
    </script>
    
    
    <style scoped>
        
    </style>